<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8">
    <title>后台登录-X-admin2.0</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="../static/css/font.css" th:href="@{/css/font.css}">
    <link rel="stylesheet" href="../static/css/xadmin.css" th:href="@{/css/xadmin.css}">
    <script type="text/javascript" src="../static/lib/jquery/jquery-3.2.1.min.js"
            th:src="@{/lib/jquery/jquery-3.2.1.min.js}"></script>
    <script src="../static/lib/layui/layui.js" th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" src="../static/js/xadmin.js" th:src="@{/js/xadmin.js}"></script>

</head>
<body>
<button class="layui-btn upload"  id="#upload">上传文件</button>

<script type="text/javascript">
    layui.use('element', function () {
        var element = layui.element;

    });
    var layer;
    layui.use('layer', function(){
        layer = layui.layer;
    });
    var form;
    layui.use('form', function(){
        form = layui.form;
    });

    layui.use('upload', function () {
        var upload = layui.upload; //得到 upload 对象
        upload.render({
            elem: '.upload'
            ,url:'/score/inside/addBatch'
            ,bindAction:'#upload'
            , done: function (res, index, upload) {
                var item = this.item;
            }
            , drog: true
            ,accept: 'file'
        })
    })
</script>
</body>
</html>